The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.
Mobile applications are computer programs designed to run on mobile devices, such as smartphones, tablets, and so forth. However, since mobile devices tend to have limited resources compared to their personal computer counterparts, application developers face significant challenges managing those resources in mobile environments. For example, within the same mobile device, multiple applications may need to manage and share resources such as memory, network connections, processor time, hardware encoders/decoders, screen space, screen buffers, and so forth.
One context in which sharing resources is especially challenging involves applications which present media. Media applications tend to be particularly resource intensive and, due to the limited capacity of mobile devices, often cannot be run simultaneously with other applications without significantly degrading system performance. For example, many mobile operating systems, such as Android, place applications that are not the current focus into a suspended or lower priority state. For instance, this state change may occur when a user minimizes the current application or executes a new application. During this state change resources, such as memory, hardware components, software components, and so forth that had been acquired by the application are released so that the operating system can provide those resources to higher priority applications.
When the application again becomes the focus, the application reacquires the released resources and redraws the user interface and other windows to be displayed to the user. However, some session specific resources, once released, may not be recoverable without significant delay. For example, in the context of streaming media, when the media buffer is released the data within that buffer needs to be reacquired from the content provider, such as a server, a content distribution network, a storage device, and so forth. Consequently, upon reactivating the application, the user may be forced to wait for the application to reestablish a connection to the source of the media and refill the buffer before playback can resume. The aforementioned situation can result in a frustrating experience since even a brief minimization of the application (for example, to check email or respond to a text message) can introduce a significant delay when resuming playback due to the need to rebuild session specific resources. As a result, there is need in the industry for a technique which allows playback to be resumed in an expedited and efficient manner despite application context switches in a resource limited environment.